import java.awt.*;

//玩家，小兵，防御塔，野怪的父类
public abstract class Unit {
    Attack attack;
    int id;
    int x = 0;
    int y = 0;
    int attackRadius;
    int damage;
    int hpLeft;
    int hpTotal;
    int mp;

    Team team;

    Coord target;

    //下路兵线的中间点
    static Coord downLineTarget;
    static Coord upperLineTarget;

    MovingDirection movingDirection;

    UnitState state;

    int timer1;

    abstract  void paint(Graphics graphics);
    abstract  void move();
    abstract  void attack(Graphics graphics);

    @Override
    public String toString() {
        return "Unit{" +
                "attack=" + attack +
                ", id=" + id +
                ", x=" + x +
                ", y=" + y +
                ", attackRadius=" + attackRadius +
                ", damage=" + damage +
                ", hpLeft=" + hpLeft +
                ", mp=" + mp +
                ", target=" + target +
                ", movingDirection=" + movingDirection +
                ", state=" + state +
                '}';
    }
}
